4fc120f2b64ab8ece61c08e9b7804ae3ce9b3c83,plugin/src/net/groboclown/idea/p4ic/config/P4ProjectConfigComponent.java,P4ProjectConfigComponent,announceBaseConfigUpdated,#,85

Before Change


        // Must follow the strict ordering
        ApplicationManager.getApplication().getMessageBus().syncPublisher(
                BaseConfigUpdatedListener.TOPIC_SERVERCONFIG).
                configUpdated(project, current);
        ApplicationManager.getApplication().getMessageBus().syncPublisher(
                BaseConfigUpdatedListener.TOPIC_P4SERVER).
                configUpdated(project, current);

After Change


        final P4ProjectConfig current;
        final P4ProjectConfig previous;
        synchronized (this) {
            previous = previouslyAnnouncedConfig;
            current = config;

            // Next time we call this, we need to send a copy of
            // what's considered current right now.
            if (config == null) {
                previouslyAnnouncedConfig = null;
            } else {
                previouslyAnnouncedConfig = new SimpleP4ProjectConfig(config);
            }
        }

        // Must follow the strict ordering
        if (current != null) {
            ApplicationManager.getApplication().getMessageBus().syncPublisher(
                    BaseConfigUpdatedListener.TOPIC_SERVERCONFIG).
                    configUpdated(project, current, previous);
            ApplicationManager.getApplication().getMessageBus().syncPublisher(
                    BaseConfigUpdatedListener.TOPIC_P4SERVER).
                    configUpdated(project, current, previous);